<extend name="Base/common"/>
<block name="body">
    <div class="select_ins">
        <div class="width1000">
            <div class="top_tit">
                <a href="{:U('Premium/index')}">试算车险</a> &gt;&gt; 车险计算器
            </div>
            <form action="{:U('Insurance/index')}" method="post" class="form_all" id="forms">
                <div class="select_top">
                    <!--<img src="images/select_ins1.png" alt="" id='car_logo' /> -->
                    <span id="car_title">{$model_name}</span><input type="hidden" name="model_id" value="{$model_id}" />
                </div>
                <div class="select_time">
                    <span>裸车价格:</span><input type="text" name="price" id="price" value="{$price}" />&nbsp;&nbsp;&nbsp;
                    <span>购车时间:</span><input type="text" class="datePicker" id="buy_time" />
                    <span class="select_time_icon"></span>
                </div>
                <div class="ins_claim select_label">
                    <!-- 每个label的for属性对应一个radio的id值 -->
                    <label for="claim1" class="on">
                        新车无理赔
                    </label>
                    <input type="radio" class="hide" id="claim1" name="ra_yh" value="{$yh[3]}" checked="checked"/>

                    <label for="claim2">
                        本年度无理赔
                    </label>
                    <input type="radio" class="hide" id="claim2" name="ra_yh" value="{$yh[2]}" />
                    <label for="claim3">
                        本年度有理赔3次以下
                    </label>
                    <input type="radio" class="hide" id="claim3" name="ra_yh" value="{$yh[3]}" />
                    <label for="claim4">
                        本年度有理赔3次
                    </label>
                    <input type="radio" class="hide" id="claim4" name="ra_yh" value="{$yh[4]}" />
                    <label for="claim5">
                        本年度有理赔4次
                    </label>
                    <input type="radio" class="hide" id="claim5" name="ra_yh" value="{$yh[5]}" />
                    <label for="claim6">
                        本年度有理赔5次及以上
                    </label>
                    <input type="radio" class="hide" id="claim6" name="ra_yh" value="{$yh[6]}" />
                    <label for="claim7">
                        连续2年无理赔
                    </label>
                    <input type="radio" class="hide" id="claim7" name="ra_yh" value="{$yh[1]}" />
                    <label for="claim8">
                        连续3年无理赔
                    </label>
                    <input type="radio" class="hide" id="claim8" name="ra_yh" value="{$yh[0]}" />
                </div>
                <div class="ins_car_type select_label">
                    <label for="stype1" class="on">
                        主流型 ￥<span id="m_1">1200</span>
                    </label>
                    <input type="radio" class="hide" id="stype1" checked="checked" name="stype" value="0" />

                    <label for="stype2">
                        豪华型 ￥<span id="m_2">1333</span>
                    </label>
                    <input type="radio" class="hide" id="stype2" name="stype" value="1" />

                    <label for="stype3">
                        基本型 ￥<span id="m_3">1000</span>
                    </label>
                    <input type="radio" class="hide" id="stype3" name="stype" value="2" />
                    <label for="stype4" id="custom_label">
                        自定义 ￥<span id="m_41">1000</span>
                    </label>
                    <input type="radio" class="hide" id="stype4" name="stype" value="3" />
                </div>
                <p class="ins_more_tit">
                    商业保险
                </p>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_dsz" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_dsz" name="ck_dsz" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>第三者责任险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">三者险</p>
                            <p>在发生事故时，替投保人对第三方的损失进行赔偿，包括对方的人身、车辆及财产损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>发生事故撞坏了别人的车（甚至造成了对方人员伤亡）、发生事故撞到了行人并造成伤亡。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible1" >不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)"  id="NotDeductible1" name="ed_dsz"  value="dsz"/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id='dsz'>0</span>
                    </div>
                    <div class="span4 f_l select_label ins_detail_label">
                        保险金额：<label for="money1">5万</label>
                        <input type="radio" class="hide" id="money1" name="ra_dsz" value="50000" />
                        <label for="money2" class="on">10万</label>
                        <input type="radio" class="hide" id="money2" name="ra_dsz" value="100000" />
                        <label for="money3">15万</label>
                        <input type="radio" class="hide" id="money3" name="ra_dsz" value="150000" />
                        <label for="money4">20万</label>
                        <input type="radio" class="hide" id="money4" name="ra_dsz" value="200000" />
                        <label for="money5">30万</label>
                        <input type="radio" class="hide" id="money5" name="ra_dsz" value="300000" />
                        <label for="money6">50万</label>
                        <input type="radio" class="hide" id="money6" name="ra_dsz" value="500000" />
                        <label for="money7">100万</label>
                        <input type="radio" class="hide" id="money7" name="ra_dsz" value="1000000" />
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：所有车主</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_clss" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_clss" name="ck_clss" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>车辆损失险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">车损险</p>
                            <p>在发生事故的时候，能够补偿自己的损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>上路时撞上了别人的车、不小心撞上了护栏、柱子或其他物品因外界物体导致车辆被砸受损。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible2">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible2" name="ed_clss" value="clss"/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id='clss'>0</span>
                    </div>
                    <div class="span4 f_l">
                        保险金额：￥<span id="clss_je">0</span>
                    </div>
                    <div class="span2 f_l">
                       <p class="ins_select_pad">适合：所有车主。</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_dqx" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_dqx" name="ck_dqx" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>全车盗抢险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">盗抢险</p>
                            <p>在整车发生被偷、被抢时，保险公司会按照条款赔偿因这种情况所造成的车辆损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>车辆停在外面被不法分子开走、在开车路程中遭遇劫匪抢劫，并将车夺走。</span>
                            </p>
                        </div>
                    </div>
                   <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible3">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible3" name="ed_dqx" value="dqx"/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="dqx">0</span>
                    </div>
                    <div class="span4 f_l">
                        &nbsp;
                    </div>
                    <div class="span2 f_l">
                       <p class="ins_select_pad">适合：多数车主，尤其是无固定停车场、停车场治安环境较差新车、热门车车型的车主。</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_bl" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_bl" name="ck_bl" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>玻璃单独破碎险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">玻璃险</p>
                            <p>挡风玻璃或车窗的单独破碎时，用以赔偿更换玻璃产生的经济损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>高速行驶的时候被飞石将挡风玻璃或车窗击碎、车辆停放时被高空坠物将挡风玻璃或车窗砸坏、车辆停放时被不法分子击碎车窗的（需当地派出所报案）。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    <label for="NotDeductible4" style="padding: 0;"></label>
                    
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="bl">0</span>
                    </div>
                    <div class="span4 f_l select_label ins_detail_label">
                        <label for="bltype1" class="on">国产</label>
                        <input type="radio" class="hide" id="bltype1" name="ra_bl" value="0" />
                        <label for="bltype2">进口</label>
                        <input type="radio" class="hide" id="bltype2" name="ra_bl" value="1" />
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：部分车主，尤其是经常走高速公路及停车治安环境较差地区的车主。以及价值较高车辆。</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_zrx" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_zrx" name="ck_zrx" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>自燃损失险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">自燃险</p>
                            <p>因车辆线路、油路及运转摩擦等问题引起火灾，用以赔偿因这些因素导致车辆自燃所遭受到的损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>行车过程中遭遇车辆本身问题导致车辆发生自燃受损。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible5">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible5" name="ed_zrx" value="zrx"/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="zrx">0</span>
                    </div>
                    <div class="span4 f_l">
                        &nbsp;
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：部分车主，尤其是车辆本身车辆达到三年以上、高温地区、无固定人员驾驶的车主。</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_ssx" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_ssx" name="ck_ssx" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>涉水险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">涉水险</p>
                            <p>当车辆因遭遇水淹或涉水行驶时造成车辆损失时，用以赔偿因此导致发动机损坏的损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>车辆停放时因受到自然灾害影响被水淹、水泡。车辆行驶时因道路积水导致车辆涉水并进水导致发动机损坏。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible6">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible6" name="ed_ssx" value="ssx"/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="ssx">0</span>
                    </div>
                    <div class="span4 f_l">
                        &nbsp;
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：部分车主，尤其是经常在多雨及内涝地区、涵洞桥梁多的城市行驶的车主。</p>
                    </div>
                </div>
               <!-- <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_bjmp" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_bjmp" name="ck_bjmp" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>不计免赔损失险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">不计免赔</p>
                            <p>所有商业车险仅赔偿相关保险内大部分额度的损失，而并非全部赔偿，不计免赔险用以将原本需要车主承担的部分转由保险公司负责赔偿。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>所有已投保的相关商业险保障范围内出险时。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible7">不计免赔</label>
                    	<input type="radio" class="hide" onclick="onCheckbox(this)" id="NotDeductible7" name="ed_bjmp" value=""/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="bjmp">0</span>
                    </div>
                    <div class="span4 f_l">
                        &nbsp;
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：所有购买了商业险主险及附加险、往年出险概率较高的的车主。</p>
                    </div>
                </div>
                -->
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_sjx" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_sjx" name="ck_sjx" value="1"/>
                    </div>
                    <div class="span2 f_l relative">
                        <span>司机座位责任险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">司机座位责任险</p>
                            <p>发生事故时，赔偿车内司机的伤亡和医疗赔偿费用。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>发生事故时，车内司机不幸受伤。</span>
                            </p>
                        </div>
                    </div>
                   <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible8">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible8" name="ed_sjx" value="sjx"/>
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="sjx">0</span>
                    </div>
                    <div class="span4 f_l select_label ins_detail_label">
                        每次事故责任限额：
                        <label for="sj1" class="on">1万</label>
                        <input type="radio" class="hide" id="sj1" name="ra_sjx" value="10000" />
                        <label for="sj2">2万</label>
                        <input type="radio" class="hide" id="sj2" name="ra_sjx" value="20000" />
                        <label for="sj3">3万</label>
                        <input type="radio" class="hide" id="sj3" name="ra_sjx" value="30000" />
                        <label for="sj4">4万</label>
                        <input type="radio" class="hide" id="sj4" name="ra_sjx" value="40000" />
                        <label for="sj5">5万</label>
                        <input type="radio" class="hide" id="sj5" name="ra_sjx" value="50000" />
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：多数车主，尤其是新手及经常将车辆外借别人的车主。</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_ckx" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_ckx" name="ck_ckx" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>乘客座位责任险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">乘客座位责任险</p>
                            <p>发生事故时，赔偿车内乘客的伤亡和医疗赔偿费用。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>发生事故时，车内乘客不幸受伤。</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible9">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible9" name="ed_ckx" value="ckx"/>
                    </div>
                    <div class="span1 f_l" id='ckzwx'>
                        ￥<span id="ckx">0</span>
                    </div>
                    <div class="span4 f_l select_label ins_detail_label">
                        每次事故责任限额：
                        <label for="ck1" class="on">1万</label>
                        <input type="radio" class="hide" id="ck1" name="ra_ckx" value="10000" />
                        <label for="ck2">2万</label>
                        <input type="radio" class="hide" id="ck2" name="ra_ckx" value="20000" />
                        <label for="ck3">3万</label>
                        <input type="radio" class="hide" id="ck3" name="ra_ckx" value="30000" />
                        <label for="ck4">4万</label>
                        <input type="radio" class="hide" id="ck4" name="ra_ckx" value="40000" />
                        <label for="ck5">5万</label>
                        <input type="radio" class="hide" id="ck5" name="ra_ckx" value="50000" />
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：多数车主，经常带家人或朋友一同外出的车主。</p>
                    </div>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <label for="ck_hh" class="ins_checkbox">
                        </label>
                        <input type="checkbox" class="hide" id="ck_hh" name="ck_hh" value="1" />
                    </div>
                    <div class="span2 f_l relative">
                        <span>车身划痕险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">车身划痕险</p>
                            <p>针对无碰撞痕迹的车身表面油漆单独受损的车辆损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>车辆停放时被其他车辆刮蹭导致车身油漆受损、车辆停放期间被他人恶意用尖锐物品划伤等导致车身油漆受损、开车时剐蹭到障碍物导致车身油漆受损。</span>
                            </p>
                        </div>
                    </div>
                   <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible10">不计免赔</label>
                    	<input type="checkbox" class="hide" onclick="onCheckbox(this)" id="NotDeductible10" name="ed_hh" value="hh"/>
                    </div>
                    <div class="span1 f_l" id='hhx'>
                        ￥<span id="hh">0</span>
                    </div>
                    <div class="span4 f_l select_label ins_detail_label">
                        赔付额度：
                        <label for="hh1" class="on">2千</label>
                        <input type="radio" class="hide" id="hh1" name="ra_hh" value="2000" />
                        <label for="hh2">5千</label>
                        <input type="radio" class="hide" id="hh2" name="ra_hh" value="5000" />
                        <label for="hh3">1万</label>
                        <input type="radio" class="hide" id="hh3" name="ra_hh" value="10000" />
                        <label for="hh4">2万</label>
                        <input type="radio" class="hide" id="hh4" name="ra_hh" value="20000" />
                    </div>
                    <div class="span2 f_l">
                        <p class="ins_select_pad">适合：多数车主，尤其是新车及对外观比较在意的车主。注：部分保险公司对车龄在三年以上的车辆不予投保。</p>
                    </div>
                </div>

                <div class="ins_more_tit">
                    交强险和车船税
                    <p class="ins_more_tit_right">车船税
                        <span class="ins_more_color" id="t_ccs">480</span>元 交强险
                        <span class="ins_more_color" id="t_jqx">950</span>元
                    </p>
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                    &nbsp;
                    </div>
                    <div class="span2 f_l relative">
                        <span>车船使用税</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">车船使用税</p>
                            <p>在发生事故的时候，能够补偿自己的损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>不小心撞了别人的车，或者不小心撞了护栏等导致的车辆受损</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label for="NotDeductible12" style="padding: 0;"></label>
                    	
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="ccs">0</span>
                    </div>
                   
                </div>
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        &nbsp;
                    </div>
                    <div class="span2 f_l relative">
                        <span>交强险</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail">
                            <p class="ins_detail_tit">玻璃单独破碎险</p>
                            <p>在发生事故的时候，能够补偿自己的损失。</p>
                            <p>
                                <span class="ins_detail_scene">场景：</span>
                                <span>不小心撞了别人的车，或者不小心撞了护栏等导致的车辆受损</span>
                            </p>
                        </div>
                    </div>
                    <div class="span1 select_label ins_datail_label" style="float:left;">
                    	<label  style="padding: 0;"></label>                    	
                    </div>
                    <div class="span1 f_l">
                        ￥<span id="jqx">0</span>
                    </div>
                    <div class="span4 f_l">
                        &nbsp;
                    </div>
                    
                </div>
             	<div style="text-align: right">
             	￥<span style="color:#b10101;font-weight: 700;" id="m_4">1000</span>
             	</div>
                <div class="clearfix ins_selecgt_list cj_zb_insurance">
                    	<div class="zb_insurance" >
                    		参加智保车险
                    	</div>
                    	<div class="zb_awardClass" style="padding: 0;text-align:left">
                    		<p style="line-height: 30px;margin-bottom: 10px">基本奖励：<span id="jbjl" style="margin-left: 9px;">0</span>元</p>
                    		<p>环保奖励：<span id="hbjl" style="margin-left: 9px;">0</span>元</p>
                    	</div>
                    	<div class="zb_d_f" style="width: 30%;">
                    		开车频率:<div class="btn-select" id="btn_select">
                              <span class="cur-select" style="height: 30px;line-height: 30px;">一周开车天数     5天</span>
								<select onchange="selectOnChange(this)" style="width: 70%;">
								<option class="btn-opton" value="0">0天</option>
								<option class="btn-opton" value="1">1天</option>
								<option class="btn-opton" value="2">2天</option>
								<option class="btn-opton" value="3">3天</option>
								<option class="btn-opton" value="4">4天</option>
								<option class="btn-opton" value="5">5天</option>
								<option class="btn-opton" value="6">6天</option>
								<option class="btn-opton" value="7">7天</option>
								</select>
								<input name="days" type="hidden" value="2"/>
								</div> 
                    	</div >
                    	<div class="zb_reward" style="text-align:left;width: auto;">
                    		奖励金额:<span id="jlje" style="color: orange;font-size: 24px;margin-left: 9px;">0元</span>
                    	</div>
                    </div>
                <input type="submit" value="定制我的车险" class="form_submit" />
            </form>
        </div>
        
    </div>
</block>
<block name="script">
<script type="text/javascript" src="__PUBLIC__/Home/js/insurance.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/calc.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/datePicker.js"></script>
<script type="text/javascript">


	function selectOnChange (obj) {
		$(".cur-select").text("一周开车天数      "+obj.options[obj.selectedIndex].text);
		$("input[name=days]").attr('value',7-obj.options[obj.selectedIndex].value);
		zbcx_jl(7-obj.options[obj.selectedIndex].value);
		
	}
	

	/*时间默认修改*/
	$(function(){
		var date=new Date();
		date.setFullYear(date.getFullYear()-1);
		$('#buy_time').attr('value',date.format('yyyy-MM-dd'));	
	});
	
	Date.prototype.format = function(format){
		var o = {
		"M+" : this.getMonth()+1, //month
		"d+" : this.getDate(), //day
		"h+" : this.getHours(), //hour
		"m+" : this.getMinutes(), //minute
		"s+" : this.getSeconds(), //second
		"q+" : Math.floor((this.getMonth()+3)/3), //quarter
		"S" : this.getMilliseconds() //millisecond
		}

		if(/(y+)/.test(format)) {
		format = format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
		}

		for(var k in o) {
		if(new RegExp("("+ k +")").test(format)) {
		format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length));
		}
		}
		return format;
		} 
	
	
	var calc = Calc.createNew();
    calc.configUrl = "{:U('getConfig')}";
    calc.setParams({$price|default='0'},{$seatnum|default='0'},1,{$pl|default='0'});
    calc.cb = function(bInit){
        $('#dsz').text(this.dsz);
        $('#clss').text(this.clss);
        $('#clss_je').text(this.price);
        $('#dqx').text(this.dqx);
        $('#bl').text(this.bl);
        $('#zrx').text(this.zrx);
        $('#ssx').text(this.ssx);
        $('#bjmp').text(this.bjmp);
        $('#sjx').text(this.sjx);
        $('#ckx').text(this.ckx);
        $('#hh').text(this.hh);
        $('#jqx').text(this.jqx);
        $('#ccs').text(this.ccs);
        $('#t_jqx').text(this.jqx);
        $('#t_ccs').text(this.ccs);
        
        if(bInit){
            $('#m_1').text(getScheme(0));
            $('#m_2').text(getScheme(1));
            $('#m_3').text(getScheme(2));
            $('#m_4').text(getScheme(0));
            var jbjl=Math.round(getScheme(0)*0.1)
            var hbjl=Math.round(getScheme(0)*0.4)
            var jlje=jbjl+hbjl
            $("#jbjl").text(jbjl);
            $("#hbjl").text(hbjl);
            $("#jlje").text(jlje+'元');
            
        }
        calcScheme();
    };
    calc.getConfig();
    
    function selCheckbox(id,checked){
        $(id).prop('checked',checked);
        if(checked){
            $(id).prev().addClass('on');
        }else{
            $(id).prev().removeClass('on');
        }
    }
    
    function onCheckbox(obj){
      var id="#"+obj.id
      if($(id).attr("checked")=='checked'){
    	  $(id).prev().removeClass('on');
    	  $(id).removeAttr("checked"); 	  
      }else{
    	  $(id).prev().addClass('on');
    	  $(id).attr("checked",'true'); 
      }
    }
    function setScheme(n){
        switch(n){
        case 0:
            selCheckbox('#ck_dsz',true);//第三者责任险
            selCheckbox('#ck_clss',true);//车辆损失险
            selCheckbox('#ck_dqx',true);//盗抢险
            selCheckbox('#ck_bl',false); //玻璃损失险
            selCheckbox('#ck_sjx',false); //司机座位责任险
            selCheckbox('#ck_ckx',false); //乘客座位责任险
            selCheckbox('#ck_hh',false);//车身划痕险
            selCheckbox('#ck_zrx',true);//自燃险
            selCheckbox('#ck_ssx',false);//涉水险
            selCheckbox('#ck_bjmp',true);//不计免赔
            break;
        case 1:
            selCheckbox('#ck_dsz',true);//第三者责任险
            selCheckbox('#ck_clss',true);//车辆损失险
            selCheckbox('#ck_dqx',true);//盗抢险
            selCheckbox('#ck_bl',true); //玻璃损失险
            selCheckbox('#ck_sjx',true); //司机座位责任险
            selCheckbox('#ck_ckx',true); //乘客座位责任险
            selCheckbox('#ck_hh',true);//车身划痕险
            selCheckbox('#ck_zrx',true);//自燃险
            selCheckbox('#ck_ssx',true);//涉水险
            selCheckbox('#ck_bjmp',true);//不计免赔
            break;        
        case 2:
            selCheckbox('#ck_dsz',true);//第三者责任险
            selCheckbox('#ck_clss',true);//车辆损失险
            selCheckbox('#ck_dqx',false);//盗抢险
            selCheckbox('#ck_bl',false); //玻璃损失险
            selCheckbox('#ck_sjx',false); //司机座位责任险
            selCheckbox('#ck_ckx',false); //乘客座位责任险
            selCheckbox('#ck_hh',false);//车身划痕险
            selCheckbox('#ck_zrx',false);//自燃险
            selCheckbox('#ck_ssx',false);//涉水险
            selCheckbox('#ck_bjmp',false);//不计免赔
            break;
        case 3:
            break;
        }
    }
    
    function getScheme(n){
        switch(n){
        case 0:
            calc.b_dsz = true;//第三者责任险
            calc.b_clss = true;//车辆损失险
            calc.b_dqx = true;//盗抢险
            calc.b_bl = false; //玻璃损失险
            calc.b_sjx = false; //司机座位责任险
            calc.b_ckx = false; //乘客座位责任险
            calc.b_hh = false;//车身划痕险
            calc.b_zrx = true;//自燃险
            calc.b_ssx = false;//涉水险
            calc.b_bjmp = true;//不计免赔
            break;
        case 1:
            calc.b_dsz = true;//第三者责任险
            calc.b_clss = true;//车辆损失险
            calc.b_dqx = true;//盗抢险
            calc.b_bl = true; //玻璃损失险
            calc.b_sjx = true; //司机座位责任险
            calc.b_ckx = true; //乘客座位责任险
            calc.b_hh = true;//车身划痕险
            calc.b_zrx = true;//自燃险
            calc.b_ssx = true;//涉水险
            calc.b_bjmp = true;//不计免赔
            break;        
        case 2:
            calc.b_dsz = true;//第三者责任险
            calc.b_clss = true;//车辆损失险
            calc.b_dqx = false;//盗抢险
            calc.b_bl = false; //玻璃损失险
            calc.b_sjx = false; //司机座位责任险
            calc.b_ckx = false; //乘客座位责任险
            calc.b_hh = false;//车身划痕险
            calc.b_zrx = false;//自燃险
            calc.b_ssx = false;//涉水险
            calc.b_bjmp = false;//不计免赔
            break;
        case 3:
            break;
        }
        var yh = parseFloat($('input[name="ra_yh"]:checked').val()); 
        return Math.round(calc.getTotal()*yh+calc.getQz());       
    }
    
    function calcScheme(){
        calc.b_dsz = $('#ck_dsz').prop('checked');//第三者责任险
        calc.b_clss = $('#ck_clss').prop('checked');//车辆损失险
        calc.b_dqx = $('#ck_dqx').prop('checked');//盗抢险
        calc.b_bl = $('#ck_bl').prop('checked'); //玻璃损失险
        calc.b_sjx = $('#ck_sjx').prop('checked'); //司机座位责任险
        calc.b_ckx = $('#ck_ckx').prop('checked'); //乘客座位责任险
        calc.b_hh = $('#ck_hh').prop('checked');//车身划痕险
        calc.b_zrx = $('#ck_zrx').prop('checked');//自燃险
        calc.b_ssx = $('#ck_ssx').prop('checked');//涉水险
        calc.b_bjmp = $('#ck_bjmp').prop('checked');//不计免赔
        
        
    	calc.bjmp_dsz=$('#NotDeductible1').prop('checked'); //第三者责任险不计免赔
        calc.bjmp_clss=$('#NotDeductible2').prop('checked');; //车辆损失险不计免赔
        calc.bjmp_dqx=$('#NotDeductible3').prop('checked');;//盗抢险不计免赔
        calc.bjmp_zrx=$('#NotDeductible5').prop('checked');;//自燃不计免赔
        calc.bjmp_ssx=$('#NotDeductible6').prop('checked');;//涉水险不计免赔
        calc.bjmp_sjx=$('#NotDeductible8').prop('checked');;//司机座位责任险不计免赔
        calc.bjmp_ckx=$('#NotDeductible9').prop('checked');;//乘客座位责任险不计免赔
        calc.bjmp_hh=$('#NotDeductible10').prop('checked');;//车身划痕险不计免赔
    	
        
        var yh = parseFloat($('input[name="ra_yh"]:checked').val());  
		zbcx_jl($("input[name=days]").val())
        $('#m_4').text(Math.round(calc.getTotal()*yh+calc.getQz()));
    }
    
    function zbcx_jl(day){
    	var yh=parseFloat($('input[name="ra_yh"]:checked').val());
    	var zj=Math.round(calc.getTotal()*yh)
    	var jbjl=Math.round(zj*0.1);
        var hbjl=Math.round(zj*0.4/7*day);
        var jlje=jbjl+hbjl;
    	$("#jbjl").text(jbjl);
        $("#hbjl").text(hbjl);
        $("#jlje").text(jlje+'元');	
    }
    
    function chg2Cust(){
        $('#custom_label').trigger('click');
        $("input[name='stype'][value='3']").attr("checked",true);
    }
    
    $(document).ready(function(){
        setScheme(0);
         $("input[name='stype']:radio").change(function(){
            var n = $(this).val();
            setScheme(parseInt(n));
         }); 
         $('#price').change(function(){
        	 calc.price=$('#price').val();
             calc.calcAll(true);
         });
         $('#buy_time').change(function(){
            calc.setBuyTime($(this).val());
            calc.calcAll(true);
         });
         $('input[name="ra_dsz"]:radio').change(function(){
             calc.dszM = parseInt($(this).val());
             calc.calcAll();
             chg2Cust();
         });
         $('input[name="ra_bl"]:radio').change(function(){
             calc.blType = parseInt($(this).val());
             calc.calcAll();
             chg2Cust();
         });
         $('input[name="ra_sjx"]:radio').change(function(){
             calc.sjM = parseInt($(this).val());
             calc.calcAll();
             chg2Cust();
         });
         $('input[name="ra_ckx"]:radio').change(function(){
             calc.ckM = parseInt($(this).val());
             calc.calcAll();
             chg2Cust();
         });
         $('input[name="ra_hh"]:radio').change(function(){
             calc.hhM = parseInt($(this).val());
             calc.calcAll();
             chg2Cust();
         });
         $('input:checkbox').change(function(){
            calcScheme();
            chg2Cust();
         });
         $('input[name="ra_yh"]:radio').change(function(){
             calc.calcAll(true);
         });
        
    });
</script>
</block>
